import request from '@/utils/request'

// 获取年级
export function getGrade(query) {
  return request({
    url: '/jbl-user-center/api/common/v1/getGrade',
    method: 'get',
    params: query
  })
}

// 获取全部省份
export function provinceList(query) {
  return request({
    url: '/jbl-user-center/api/v1/address/province/list',
    method: 'get',
    params: query
  })
}

// 根据provinceCode获取市
export function cityList(query) {
  return request({
    url: '/jbl-user-center/api/v1/address/city/list',
    method: 'get',
    params: query
  })
}

// 根据市cityCode查询区
export function areaList(query) {
  return request({
    url: '/jbl-user-center/api/v1/address/area/list',
    method: 'get',
    params: query
  })
}

// 根据区areaCode获取街道/镇
export function streetList(query) {
  return request({
    url: '/jbl-user-center/api/v1/address/street/list',
    method: 'get',
    params: query
  })
}

// 获取所有标签
export function getAllLabels(query) {
  return request({
    url: '/jbl-business/api/merchant/v1/label/getByConditions',
    method: 'get',
    params: query
  })
}

// 查询所有的分类包含父分类和子分类
export function getCategoryAll(query) {
  return request({
    url: '/jbl-business/api/v1/category/getCategoryAll',
    method: 'get',
    params: query
  })
}

// 商户端-根据账号id获取所有总校列表
export function selectOrgList(query) {
  return request({
    url: '/jbl-user-center/api/common/v1/selectOrgList',
    method: 'get',
    params: query
  })
}

// 机构端-根据手机号获取所有学校列表；包含总校和分校
export function selectOrgAuditList(query) {
  return request({
    url: '/jbl-user-center/api/common/v1/selectOrgAuditList',
    method: 'get',
    params: query
  })
}

// 获取当前用户的所有机构列表
export function selectAllList(query) {
  return request({
    url: '/jbl-user-center/api/common/v1/selectAllList',
    method: 'get',
    params: query
  })
}

// 根据机构编号------获取机构详情包括审核资料
export function getBusinessCertify(query) {
  return request({
    url: '/jbl-business/api/merchant/v1/business/getBusinessCertify',
    method: 'get',
    params: query
  })
}

// 商户端-手机验证码验证
export function veryCode(data) {
  return request({
    url: '/jbl-user-center/api/common/v1/veryCode',
    method: 'post',
    data: data
  })
}

// 腾讯地图关键词输入提示
export function suggestion(query) {
  return request({
    url: 'https://apis.map.qq.com/ws/place/v1/suggestion',
    method: 'get',
    params: query
  })
}
